package com.bestcem.xm.deliver.controller.v2.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.bestcem.xm.component.mybatis.format.String2JacksonSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class SurveyDeliverPageVo {
    @JsonProperty("created_id")
    private String createdId;

    @JsonProperty("updated_id")
    private String updatedId;

    @JsonProperty("version_id")
    private Integer versionId;

    @JsonProperty("deleted")
    private Boolean deleted;

    @JsonProperty("created_dt")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createdDt;

    @JsonProperty("updated_dt")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatedDt;

    private String id;

    @JsonProperty("orgID")
    private String orgId;

    @JsonProperty(value = "survey_id")
    private String surveyId;

    @JsonProperty(value = "deliver_id")
    private String deliverId;

    @JsonProperty(value = "deliver_docs")
    private DeliverVo deliverDocs;
    private String title;
    private Integer finished;
    private Long planed;
    @JsonProperty(value = "mp_name")
    private String mpName;
    @JsonProperty(value = "mp_ttype")
    private Integer mpTtype;
    private Integer processing;
    private Integer status;

    @JsonProperty(value = "is_delay")
    private Integer isDelay;
    @JsonProperty(value = "deliver_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deliverTime;

    private String link;
    @JsonProperty(value = "alarm_clock")
    private Integer alarmClock;
    @JsonProperty(value = "deliver_expired")
    private Integer deliverExpired;

    @JsonProperty("link_aging_type")
    @JSONField(name = "link_aging_type")
    private Integer linkAgingType;

    @JsonProperty("link_aging_time")
    @JsonSerialize(using = String2JacksonSerializer.class)
    private String linkAgingTime;

    @JsonProperty(value = "req_method")
    private Integer reqMethod;
}